package leetcodeHis.递归;

public class 汉诺塔 {



    public static void main(String[] args) {
        handle(3, 'a', 'b', 'c');
    }

    //1.设置函数
    //2. 找出层级关系
    public static void handle (int n, char a, char b, char c) {
        //
        if(n<=0) {
            return;
        }

        handle(n-1, a, c, b);
        System.out.println("从" + a + "移动到" + c);
        handle(n-1, b, a, c);
    }
}
